OmniIndex Exceptions topic

Enums

===========================

Library defines a set of exception classes that extend the base OmniIndexException class. Each exception class has a constructor that takes an optional message parameter and overrides the toString() method to return the exception message.

Inputs

message: An optional string parameter used to initialize the exception message. If no message is provided, the default value is an empty string.

Flow

  • The OmniIndexException class is defined, implementing the Exception interface.

  • The OmniIndexTimeoutException, OmniIndexAPINotKnownException, OmniIndexAuthException, OmniIndexConfigurationException, OmniIndexUserException, and OmniIndexUserNotKnownException classes are defined, each extending the OmniIndexException class.

  • Each exception class overrides the toString() method to return the exception message.

Outputs

The exception message as a string.

Usage example

// Throw exception
throw OmniIndexException("Error somewhere");